/**
 * 
 */
package unifor.filetransfer.comandos;

import javax.swing.JTextField;

import org.swixat.model.GenericContext;

import unifor.filetransfer.receptor.IniciarServidorThread;

/**
 * @author Landim - Arthur Landim
 *
 */
public class IniciarServidorAction extends GenericAction {

    /* (non-Javadoc)
     * @see unifor.filetransfer.comandos.GenericAction#action(org.swixat.model.GenericContext)
     */
    @Override
    public void action(GenericContext context) throws Exception {
        
        String porta = ((JTextField) getMapParams(context).get("portaTcp")).getText();
        int destPort = 100;               // Destination port
        if (!"".equals(porta)) {
            destPort = Integer.parseInt(porta);
        }
        
        Thread iniciar = new IniciarServidorThread(destPort);
        iniciar.start();


    }

}














